package clsr.info.blog.web.controller;

import clsr.info.blog.common.api.IClassifyService;
import clsr.info.blog.common.entity.Classify;
import clsr.info.blog.common.pojo.JsonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/classify")
public class ClassifyController {

  @Autowired private IClassifyService classifyService;

  @RequestMapping("/loadClassify")
  public JsonResponse<List<Classify>> loadClassify() {
    List<Classify> classifies = classifyService.loadClassify(1);
    return JsonResponse.success(classifies);
  }
}
